/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author xespin
 */
@Entity
@Table(name = "REPLY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Reply.findAll", query = "SELECT r FROM Reply r"),
    @NamedQuery(name = "Reply.findById", query = "SELECT r FROM Reply r WHERE r.id = :id"),
    @NamedQuery(name = "Reply.findByReceiveridfk", query = "SELECT r FROM Reply r WHERE r.receiveridfk = :receiveridfk"),
    @NamedQuery(name = "Reply.findByMessageidfk", query = "SELECT r FROM Reply r WHERE r.messageidfk = :messageidfk")})
public class Reply implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue
    @NotNull
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "RECEIVERIDFK")
    private long receiveridfk;
    @Basic(optional = false)
    @NotNull
    @Column(name = "MESSAGEIDFK")
    private long messageidfk;

    public Reply() {
    }

    public Reply(Long id) {
        this.id = id;
    }

    public Reply(Long id, long receiveridfk, long messageidfk) {
        this.id = id;
        this.receiveridfk = receiveridfk;
        this.messageidfk = messageidfk;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getReceiveridfk() {
        return receiveridfk;
    }

    public void setReceiveridfk(long receiveridfk) {
        this.receiveridfk = receiveridfk;
    }

    public long getMessageidfk() {
        return messageidfk;
    }

    public void setMessageidfk(long messageidfk) {
        this.messageidfk = messageidfk;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Reply)) {
            return false;
        }
        Reply other = (Reply) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Reply[ id=" + id + " ]";
    }
    
}
